home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python2.5.postinst < prev    next >
Text File  |  2008-10-05  |  2KB  |  52 lines

  1. #! /bin/sh -e
  2. #
  3. # postinst script for the Debian python2.5-base package.
  4. # Written 1998 by Gregor Hoffleit <flight@debian.org>.
  5. #
  6.  
  7. # remove unconditionally
  8. update-alternatives --remove python /usr/bin/python2.5 || true
  9.  
  10. if [ "$1" = configure ]; then
  11.     (
  12.     files=$(dpkg -L python2.5 | sed -n '/^\/usr\/lib\/python2.5\/.*\.py$/p')
  13.     /usr/bin/python2.5 /usr/lib/python2.5/py_compile.py $files
  14.     if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
  15.         /usr/bin/python2.5 -O /usr/lib/python2.5/py_compile.py $files
  16.     fi
  17.     )
  18. fi
  19.  
  20. case "$1" in
  21.     configure|abort-upgrade|abort-remove|abort-deconfigure)
  22.  
  23.         # Create empty directories in /usr/local
  24.         if [ ! -e /usr/local/lib/python2.5 ]; then
  25.             mkdir -p /usr/local/lib/python2.5 2> /dev/null || true
  26.             chmod 2775 /usr/local/lib/python2.5 2> /dev/null || true
  27.             chown root:staff /usr/local/lib/python2.5 2> /dev/null || true
  28.         fi
  29.         if [ ! -e /usr/local/lib/python2.5/site-packages ]; then
  30.             mkdir -p /usr/local/lib/python2.5/site-packages 2> /dev/null || true
  31.             chmod 2775 /usr/local/lib/python2.5/site-packages 2> /dev/null || true
  32.             chown root:staff /usr/local/lib/python2.5/site-packages 2> /dev/null || true
  33.         fi
  34.     ;;
  35.  
  36.     *)
  37.         echo "postinst called with unknown argument \`$1'" >&2
  38.         exit 1
  39.     ;;
  40. esac
  41.  
  42. ldconfig
  43.  
  44. # Automatically added by dh_installmenu
  45. if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
  46.     update-menus
  47. fi
  48. # End automatically added section
  49.  
  50.  
  51. exit 0
  52.